﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProjectMigrator;

namespace Tests
{
    [TestClass]
    public class MainKeywordsTest
    {

        [TestMethod]
        public void TestUsingMicrosoftCrmSdk()
        {
            var codeConversion = new CodeConversion();

            var actual = codeConversion.Convert("using Microsoft.Crm.Sdk;");
            var expected = "using Microsoft.Xrm.Sdk;";

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestUsingMicrosoftCrmSdkMetadata()
        {
            var codeConversion = new CodeConversion();

            var actual = codeConversion.Convert("using Microsoft.Crm.Sdk.Metadata;");
            var expected = "Microsoft.Xrm.Sdk.Metadata;";

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestUsingMicrosoftCrmSdkMetadataQuery()
        {
            var codeConversion = new CodeConversion();

            var actual = codeConversion.Convert("using Microsoft.Crm.Sdk.Metadata.Query;");
            var expected = "using Microsoft.Xrm.Sdk.Metadata.Query;";

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void TestUsingMicrosoftCrmSdkQuery()
        {
            var codeConversion = new CodeConversion();

            var actual = codeConversion.Convert("using Microsoft.Crm.Sdk.Query;");
            var expected = "using Microsoft.Xrm.Sdk.Query;";

            Assert.AreEqual(expected, actual);
        }

    }
}
